Change in openvpn[release/2.6]: Warn user if INFO control command is too long
A message that is not in the archive (sent off-list or not yet received): gerrit.1694436141000.If3c27a2a2ba24f2af0e3e3c95eea57ed420b2542@...2715...
Attention is currently required from: flichtenheld.
Hello flichtenheld,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/329?usp=email
to review the following change.
Change subject: Warn user if INFO control command is too long
......................................................................
Warn user if INFO control command is too long
"INFO_PRE,..." command length is limited to 256 bytes. If the server implementation pushes command which is too long, warn the user and don't send the truncated command to a management client.
---
M src/openvpn/push.c
1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/29/329/1
src/openvpn/push.c +8 -2
@@ -244,8 +244,14 @@* for management greeting and we don't want to confuse the client */ struct buffer out =alloc_buf_gc (256 , &gc); -buf_printf (&out,">%s:%s" ,"INFOMSG" , m); -management_notify_generic (management,BSTR (&out)); +if (buf_printf (&out,">%s:%s" ,"INFOMSG" , m)) + { +management_notify_generic (management,BSTR (&out)); + } +else + { +msg (D_PUSH_ERRORS ,"WARNING: Received INFO command is too long, won't notify management client." ); + }gc_free (&gc); }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/329?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: If3c27a2a2ba24f2af0e3e3c95eea57ed420b2542
Gerrit-Change-Number: 329
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: stipa.
flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/329?usp=email )
Change subject: Warn user if INFO control command is too long
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/329?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: If3c27a2a2ba24f2af0e3e3c95eea57ed420b2542
Gerrit-Change-Number: 329
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: stipa <[email protected]...>
Gerrit-Comment-Date: Tue, 12 Sep 2023 09:53:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: stipa.
flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/329?usp=email )
Change subject: Warn user if INFO control command is too long
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Honestly, I still prefer the original patch. But this at least gives the user a chance to notice the problem...
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/329?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: If3c27a2a2ba24f2af0e3e3c95eea57ed420b2542
Gerrit-Change-Number: 329
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: stipa <[email protected]...>
Gerrit-Comment-Date: Tue, 12 Sep 2023 09:54:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
PATCH 1/1 Warn user if INFO control command is too long
In reply to a message not in the archiveFrom: Lev Stipakov <[email protected]...>
"INFO_PRE,..." command length is limited to 256 bytes. If the server implementation pushes command which is too long, warn the user and don't send the truncated command to a management client.
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to release/2.6.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/329
This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <[email protected]...>
src/openvpn/push.c +8 -2
@@ -244,8 +244,14 @@* for management greeting and we don't want to confuse the client */ struct buffer out =alloc_buf_gc (256 , &gc); -buf_printf (&out,">%s:%s" ,"INFOMSG" , m); -management_notify_generic (management,BSTR (&out)); +if (buf_printf (&out,">%s:%s" ,"INFOMSG" , m)) + { +management_notify_generic (management,BSTR (&out)); + } +else + { +msg (D_PUSH_ERRORS ,"WARNING: Received INFO command is too long, won't notify management client." ); + }gc_free (&gc); }
[Openvpn-devel] [PATCH applied] Re: Warn user if INFO control command is too long
Have not tested it beyond "test compile", but change looks reasonable.
Your patch has been applied to the master and release/2.6 branch ("make things more robust").
commit df624fb6d63db6b2a3b0c40597cee74c61b8ab2c (master) commit 785b50127ecf0c440c016f85cef0c59f56894fc4 (release/2.6)
Author: Lev Stipakov Date: Fri Sep 22 12:50:55 2023 +0200
Warn user if INFO control command is too long
Signed-off-by: Lev Stipakov <[email protected]...>
Acked-by: Frank Lichtenheld <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27062.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#2) to the change originally created by stipa. ( http://gerrit.openvpn.net/c/openvpn/+/329?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by flichtenheld
Change subject: Warn user if INFO control command is too long
......................................................................
Warn user if INFO control command is too long
"INFO_PRE,..." command length is limited to 256 bytes. If the server implementation pushes command which is too long, warn the user and don't send the truncated command to a management client.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27062.html
---
M src/openvpn/push.c
1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/29/329/2
src/openvpn/push.c +8 -2
@@ -244,8 +244,14 @@* for management greeting and we don't want to confuse the client */ struct buffer out =alloc_buf_gc (256 , &gc); -buf_printf (&out,">%s:%s" ,"INFOMSG" , m); -management_notify_generic (management,BSTR (&out)); +if (buf_printf (&out,">%s:%s" ,"INFOMSG" , m)) + { +management_notify_generic (management,BSTR (&out)); + } +else + { +msg (D_PUSH_ERRORS ,"WARNING: Received INFO command is too long, won't notify management client." ); + }gc_free (&gc); }
Signature · 12 lines
To view, visit http://gerrit.openvpn.net/c/openvpn/+/329?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: release/2.6 Gerrit-Change-Id: If3c27a2a2ba24f2af0e3e3c95eea57ed420b2542 Gerrit-Change-Number: 329 Gerrit-PatchSet: 2 Gerrit-Owner: stipa <[email protected]...> Gerrit-Reviewer: flichtenheld <[email protected]...> Gerrit-CC: openvpn-devel <[email protected]> Gerrit-MessageType: newpatchset
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/329?usp=email )
Change subject: Warn user if INFO control command is too long
......................................................................
Warn user if INFO control command is too long
"INFO_PRE,..." command length is limited to 256 bytes. If the server implementation pushes command which is too long, warn the user and don't send the truncated command to a management client.
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27062.html
---
M src/openvpn/push.c
1 file changed, 8 insertions(+), 2 deletions(-)
src/openvpn/push.c +8 -2
@@ -244,8 +244,14 @@* for management greeting and we don't want to confuse the client */ struct buffer out =alloc_buf_gc (256 , &gc); -buf_printf (&out,">%s:%s" ,"INFOMSG" , m); -management_notify_generic (management,BSTR (&out)); +if (buf_printf (&out,">%s:%s" ,"INFOMSG" , m)) + { +management_notify_generic (management,BSTR (&out)); + } +else + { +msg (D_PUSH_ERRORS ,"WARNING: Received INFO command is too long, won't notify management client." ); + }gc_free (&gc); }
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/329?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: If3c27a2a2ba24f2af0e3e3c95eea57ed420b2542
Gerrit-Change-Number: 329
Gerrit-PatchSet: 2
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged